{php include wl_template('common/header');}
<ul class="nav nav-tabs" id="myTab">
    <li class="active"><a href="javascript:;">团长列表</a></li>
</ul>
<div class="app-content">
    <div class="app-filter">
        <div class="filter-action">
            <a href="{php echo web_url('distribution/dissysbase/addgroup');}" class="btn btn-primary">添加团长</a>
        </div>
        <div class="filter-list">
            <form action="" method="get" class="form-horizontal" role="form" id="form">
                <input type="hidden" name="c" value="site" />
                <input type="hidden" name="a" value="entry" />
                <input type="hidden" name="m" value="{MODULE_NAME}" />
                <input type="hidden" name="p" value="distribution" />
                <input type="hidden" name="ac" value="dissysbase" />
                <input type="hidden" name="do" value="grouplist" />
                <input type="hidden" name="levelid" value="{$_GPC['levelid']}" />
                {if count($dislevels)>1}
                <div class="form-group max-with-all">
                    <label class="col-sm-2 control-label">团长等级</label>
                    <div class="col-sm-9">
                        <div class="btn-group">
                            <a href="{php echo wl_filter_url('levelid:0');}" class="btn {if intval($_GPC['levelid']) == 0}btn-primary{else}btn-default{/if}">不限</a>
                            {loop $dislevels $level}
                            <a href="{php echo wl_filter_url('wlf:0');}&levelid={$level['id']}" class="btn {if intval($_GPC['levelid']) == $level['id']}btn-primary{else}btn-default{/if}">{$level['name']}</a>
                            {/loop}
                        </div>
                    </div>
                </div>
                {/if}
                <div class="form-group form-inline">
                    <label class="col-md-2 control-label">关键字</label>
                    <div class="col-sm-9">
                        <select name="type" class="form-control">
                            <option value="2" {if $_GPC['type'] == 2}selected{/if}>手机号</option>
                            <option value="4" {if $_GPC['type'] == 4}selected{/if}>真实姓名</option>
                            <option value="3" {if $_GPC['type'] == 3}selected{/if}>昵称</option>
                            <option value="5" {if $_GPC['type'] == 5}selected{/if}>MID</option>
                        </select>
                        <input type="text" class="form-control" name="keyword" id="keyword" value="{$_GPC['keyword']}" />
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">修改时间</label>
                    <div class="col-md-2">
                        <select name="timetype" class="form-control">
                            <option {if empty($_GPC['timetype'])} selected="selected" {/if}  value="">关闭</option>
                            <option {if $_GPC['timetype'] > 0 } selected="selected" {/if}  value="1">开启</option>
                        </select>
                    </div>
                    <div class="col-md-2">
                        {php echo tpl_select_time_info('time_limit', array('starttime' => date('Y-m-d H:i',$starttime), 'endtime' => date('Y-m-d  H:i', $endtime)));}
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label"></label>
                    <div class="col-sm-9">
                        <button class="btn btn-primary"><i class="fa fa-search"></i> 搜索</button>
                        <button class="btn btn-default" name="export" type="submit" value="export"><i class="fa fa-download"></i> 导出</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
    <div class="app-table-list">
        <div class="table-responsive order-list">
            <table class="table table-hover">
                <thead>
                <tr>
                    <th style="width:10%;">头像</th>
                    <th style="width:10%;">昵称</th>
                    <th class="text-center" style="width:15%;">姓名<br/>电话</th>
                    <th class="text-center" style="width:15%;">更新时间</th>
                    <th class="text-center" style="width:10%;">累计佣金<br/>余额</th>
                    <th class="text-center" style="width:15%;">团员数量</th>
                    <th class="text-center" style="width:15%;">等级</th>
                    <th class="text-center" style="width:10%;">操作</th>
                </tr>
                </thead>
                <tbody>
                {loop $list $mem}
                <tr data-toggle="popover" data-trigger="hover" data-placement="left" class="js-goods-img">
                    <td><img class="scrollLoading" src="{php echo tomedia($mem['avatar'])}" data-url="{php echo tomedia($mem['avatar'])}" onerror="this.src='{IMAGE_NOPIC_SMALL}'" height="50" width="50"/></td>
                    <td class="line-feed">
                        {$mem['nickname']}<br>
                        MID:{$mem['mid']}
                    </td>
                    <td class="text-center">
                        <span class="">{$mem['realname']}</span><br />
                        <span class="">{$mem['mobile']}</span>
                    </td>
                    <td class="text-center">
                        {php echo date('Y-m-d H:i:s',$mem['updatetime'])}
                    </td>
                    <td class="text-center" style="line-height:25px;">
                        <span class="label label-success">￥{php echo number_format($mem['dismoney'], 2)}</span><br>
                        <span class="label label-info">￥{php echo number_format($mem['nowmoney'], 2)}</span>
                    </td>
                    <td class="text-center">
						<span><a href="{php echo web_url('distribution/dissysbase/grouponpeople',array('memid'=>$mem['mid']))}">{$mem['lownum']}(团长：{$mem['lowdisnum']}人)</a></span>
                    </td>
                    <td class="text-center">
                        <span class="label label-success">{$mem['rankname']}</span>
                        {if $mem['shareholder'] > 0  }<br /><br /><span class="label label-danger">股东</span>{/if}
                    </td>
                    <td  style="position:relative;text-align: center;">
                        <a href="{php echo web_url('distribution/dissysbase/editgroup',array('id'=>$mem['id']))}" onclick="setTimeout(de,1500);" data-toggle="ajaxModal">编辑  </a> -
                        <a data-toggle="ajaxRemove" href="{php echo web_url('distribution/dissysbase/deletegroup',array('id'=>$mem['id']));}" data-confirm='确认删除此团长？删除后如果此团长的上级分销商是团长，此团长的团员会变成团长的上级分销商的团员。'>删除  </a>
                    </td>
                </tr>
                {/loop}
                </tbody>
            </table>
        </div>
        <div class="app-table-foot clearfix">
            <div class="pull-left">

            </div>
            <div class="pull-right">
                {$pager}
            </div>
        </div>
    </div>
</div>
{php include wl_template('common/footer');}